package com.zofer.study.factory.factorymethod;

/**
 * @description 工厂方法模式
 * 比如需要制造苹果电脑和华为电脑，创建两个工厂，分别为苹果工厂和华为工厂
 * @date: 2020/9/29 19:09
 */
public class Main {
    public static void main(String[] args) {
        Factory huaweiFactory = new HuaWeiFactory();
        Computer huaweiComputer = huaweiFactory.createComputer();
        huaweiComputer.run();
        System.out.println("====================");
        Factory macFactory = new MacFactory();
        Computer macComputer = macFactory.createComputer();
        macComputer.run();
    }
}
